POV-Ray : Newsgroups : povray.advanced-users : Mandelbrots, Rand, and maybe more... : Mandelbrots, Rand, and maybe more... Server Time
2 Nov 2024 15:23:03 EDT (-0400)
  Mandelbrots, Rand, and maybe more...  
From: Ken
Date: 29 May 1999 01:29:30
Message: <374F6CCC.82E06A57@pacbell.net>
Mandelbrot:

  Why will the mandelbrot pigment pattern not tile as other patterns
will ? I could not find anything specific about it in the docs but
it seems to behave similar to the way the planar, spherical, and
box patterns behave i.e. in 1 unit square only non repeating patterns.


Rand:

  When a value is returned from the rand function is there a range
it is confined to i.e. 0 - 1,  .1 - 10, or ?

Is the value returned always a fraction of 1, or less than 100 or can be
anything up to and including 20 billion.



Array question(s):

#declare Dnum = 6;
#declare Data = array [Dnum][2]
{ {60, 50},
  {70,130},
  {60,170},
  {70,250},
  {60,310},
  {70,  5}}

#declare Unit = box { -1,1 }

#declare J=0; #while (J < 4)
#declare Unit =
    union {
      #declare I=0;
       #while (I < Dnum)
        object { Unit 
            rotate <Data[I][0],Data[I][1],0> 
etc.

object { Unit } = while loop constructed object


  In the above example the object Unit is declared before the loop is
started as a box object. Inside the loop another object is declared
also with the assigned designation of Unit. A later use of an object
called Unit is treated as the Unit derived from the while loop
construct and not the previously delcared box object of the same
designation.

  Why is Pov not running into a name collision when a scene is
constructed like this ?

  I was under the impression that the #local directive was designed
with this in mind but did not know that it was also extended to any
such similar use within a while loop.

  Are such naming conventions a possible ticket to later problems
or can one reliably count on the current behavior ?


Also in the above example there is an array of predetermined numbers.
I am assuming the script is using these sets of 6 numbers as x and y
vectors for the rotate command. How many numbers wide can an array
hold ?

Is the following a legal use of this function ?

#declare Dnum = 6;
#declare Data = array [Dnum][5]
{ {0.60, 0.50, 0.3, 0.1, 0.66},
  {0.70, 0.13, 0.4, 0.3, 0.55},
  {0.60, 0.17, 0.5, 0.2, 0.44},
  {0.70, 0.25, 0.6, 0.4, 0.33},
  {0.60, 0.31, 0.7, 0.6, 0.22},
  {0.70, 0.50, 0.8, 0.5, 0.11}}

 #declare I=0;
  #while (I < Dnum)
#declare Acid_Trip = 
 pigment {
  rgbft < Data[I][0], Data[I][1], Data[I][3], Data[I][4], Data[I][5] >
  }
etc.

If the above is valid it certainly opens up possibilities for some wild
and variable pigments. I could almost image feeding it my entire 677
predefined colors from my modified colors include file and then cycling
it through an animation or a similar number of pov generated objects.

-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.